package com.cn.aam.checaiduo.base;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.cn.aam.checaiduo.R;


/**
 * 专门显示fragment的activity的基类
 */
public abstract class BaseFragmentActivity extends BaseActivity {
    protected FragmentManager fragmentManager = getSupportFragmentManager();

    protected abstract Fragment getFragment();


    @Override
    protected int layoutId() {
        return R.layout.activity_base_fragment;
    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        fragmentManager.beginTransaction().add(R.id.id_content, getFragment()).commit();
    }

}
